package com.gc.baselib.img;

import android.content.Context;
import android.graphics.Bitmap;

import java.io.File;
import java.util.concurrent.ExecutionException;

/**
 * Created by zk on 2019/6/20.
 */

 interface IImageLoader {
      void  init(Context context);
      void trimMemory(int level);
      void clearMemory();
      void displayImage(ImageLoadConfig builder);
      <T> T getImage(ImageLoadConfig builder,T clazz) throws ExecutionException, InterruptedException;

     File getCacheDir();

    void clearDiskCache();

    Bitmap getBitmapFromCache(String url) throws ExecutionException, InterruptedException;

    void getBitmapFromCache(Context context, String url, IGetBitmapListener listener);

    void stopLoad(ImageLoadConfig builder);


    void pauseRequests(ImageLoadConfig config);

    void resumeRequests(ImageLoadConfig config);
}
